﻿package mortal.game.view.rebate.item
{
    import flash.events.*;
    import mortal.game.events.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.mvc.core.*;

    public class RebateIcon extends ActionBaseIcon
    {
        public var leftSecond:int = -1;
        private static var _instance:RebateIcon;

        public function RebateIcon()
        {
            super(ResFileConst.RebateIcon);
            this.name = "RebateIcon";
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this.name = "RebateIcon";
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this.name = "";
            return;
        }// end function

        override protected function clickHandler(event:MouseEvent) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.RebateModuleOpen));
            return;
        }// end function

        public static function hasInstance() : Boolean
        {
            return _instance != null;
        }// end function

        public static function get instance() : RebateIcon
        {
            if (!_instance)
            {
                _instance = new RebateIcon;
            }
            return _instance;
        }// end function

    }
}
